<?php
	####################################################
	# Cookier 서버에서 구워주는 쿠키                   #
	####################################################

	class Cookier {
		public static $separate_key = '|';

		public static function set($key, $val) {
			$ret = setcookie($key, $val, time()+60*60*24*120, '/', ".".$_SERVER['SERVER_NAME']);
			return $ret;
		}

		public static function get($key) {
			if(!empty($_COOKIE[$key])){
				return $_COOKIE[$key];
			}else {
				return FALSE;
			}
		}

		public static function del($key) {
			setcookie($key, '', time()+60*60*24*120, '/', ".".$_SERVER['SERVER_NAME']);
		}

		public static function decompose($querystring) {
			$ret = array();
			$ret = explode(Cookier::$separate_key, $querystring);
			return $ret;
		}
	}

?>